package Twice.day05;

/**
 * @Author: lya
 * @Description: 本类的作用描述:带参构造如何进行参数有效性赋值
 * @CreateDate: 2019/8/27
 * @Version: 1.0
 */
public class ConstructorParamValidDemo {
    public static void main(String[] args) {
        Student s = new Student();
        s.setSname("cnm");
        System.out.println(s);

        System.out.println(s.getSname());

        Student s2 = new Student(2,"cnm");
        System.out.println(s2);
    }
}
